R, Rstudio and GitHub

Tanzanian HCES Analysis and TFNC Training

Liberty Mlambo

University of Nottingham

1 R and RStudio

1.1 R and Rstudio

  • R is a free software environment for statistical computing and graphics
  • Rstudio is a integrated development environment (IDE) for R and Python.
    • open source and commercial editions (Windows, Mac, and Linux)

1.2 Rstudio (cont..)

  • console for direct code execution

  • syntax-highlighting editor

  • tools for plotting

  • viewing history

  • managing your workspace

2 Git

2.1 Git

Open source

Tracks file changes

Branch based non-linear workflows (we can all work at the same time)

Rstudio IDE intergration

Speed of work (for quick homework assistance)

Local environment

3 GitHub

GitHub is a web-based interface that uses Git, to let multiple people work and make changes on a project concurrently

3.1 Fremium Repository based

  • Repository based (Projects)

3.2 Built-in security

3.3 File History Tracking

3.4 Unlimited Public/ Private Repositories

3.5 Track issues and task progress

3.6 Track issues and task progress

4 Practical Demonstration

4.1 Practical Assumptions

  • Computer (Mac, Windows, Linux, etc..) with administrative privileges
  • Software download and installation experience

4.2 Practical Requirements

  • GitHub account
  • Rstudio
  • Git

5 Exercises

5.1 Exercises 1

Activity Description
1.1 GitHub sign-up GitHub signup
1.2 R download and installation R download
1.3 Rstudio download and installation Rstudio
1.4 Git download and installation Git

5.2 Exercises 2 - RStudio and Git connection (optional)

Action Command
In Rstudio console type usethis::create_github_token()
In your github account generate and copy token
In Rstudio console type gitcreds::gitcreds_set()
In Rstudio console paste token
In Rstudio terminal git config user.name "YourGitHubUsername"
In Rstudio terminal git config user.email "YourGitHubEmail@here.com"

6 Additional Resources

6.1 Additional Resources

7 Questions?

Thank you!